using System;
using System.Collections.Generic;
using System.Text;
using Suucha.Adsi.Configuration;

namespace Suucha.Adsi
{
    /// <summary>
    /// 
    /// </summary>
    public sealed class Config
    {
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public static AdsiSettings GetLdapSettings()
        {
            string ldapSettings = AdsiConfiguration.GetAdsiSettings().DefalutLdap;
            return GetSettings(ldapSettings);
        }

        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public static AdsiSettings GetWebSettings()
        {
            string webSettings = AdsiConfiguration.GetAdsiSettings().DefaultWeb;
            return GetSettings(webSettings);
        }

        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public static AdsiSettings GetFtpSettings()
        {
            string ftpSettings = AdsiConfiguration.GetAdsiSettings().DefaultFtp;
            return GetSettings(ftpSettings);
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        public static AdsiSettings GetSettings(string name)
        {
            return (AdsiSettings)AdsiConfiguration.GetAdsiSettings().AdsiSettings.Get(name);
        }
    }
}
